<%@ page import="database.ClassDb" %><%--
<%--
  Created by IntelliJ IDEA.
  User: Thinkpad
  Date: 2016/12/11
  Time: 14:54
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>移除班级</title>
</head>
<body>
<%
    if (request.getParameter("classId") == null) {
        response.getWriter().print("<script>location.href='../../error.jsp?error_code=103'</script>");
    } else {
        String classIdStr = request.getParameter("classId");
        int classId = Integer.parseInt(classIdStr);
        ClassDb.removeClass(classId);
        ClassDb.deleteAllUsersInClass(classId);
        response.getWriter().print("<script>location.href='../removeClass.jsp'</script>");
    }
%>
</body>
</html>
